﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="sgiDataSet" targetNamespace="http://tempuri.org/sgiDataSet.xsd" xmlns:mstns="http://tempuri.org/sgiDataSet.xsd" xmlns="http://tempuri.org/sgiDataSet.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
  <xs:annotation>
    <xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
      <DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
        <Connections>
          <Connection AppSettingsObjectName="Web.config" AppSettingsPropertyName="sgiConnectionString" ConnectionStringObject="" IsAppSettingsProperty="true" Modifier="Assembly" Name="sgiConnectionString (Web.config)" ParameterPrefix="@" PropertyReference="AppConfig.System.Configuration.ConfigurationManager.0.ConnectionStrings.sgiConnectionString.ConnectionString" Provider="MySql.Data.MySqlClient" />
        </Connections>
        <Tables>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="usuarioTableAdapter" GeneratorDataComponentClassName="usuarioTableAdapter" Name="usuario" UserDataComponentName="usuarioTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="sgiConnectionString (Web.config)" DbObjectName="sgi.usuario" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="false" UserGetMethodName="GetData" UserSourceName="Fill">
                <DeleteCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>DELETE FROM `usuario` WHERE ((`idUsuario` = @Original_idUsuario))</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_idUsuario" Precision="0" ProviderType="Int32" Scale="0" Size="0" SourceColumn="idUsuario" SourceColumnNullMapping="false" SourceVersion="Original" />
                    </Parameters>
                  </DbCommand>
                </DeleteCommand>
                <InsertCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>INSERT INTO `usuario` (`user`, `pass`, `ativo`, `idPessoa`, `Cadastro`, `CadastradoPor`, `Edicao`, `EditadoPor`) VALUES (@user, @pass, @ativo, @idPessoa, @Cadastro, @CadastradoPor, @Edicao, @EditadoPor)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@user" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="user" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@pass" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="pass" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="StringFixedLength" Direction="Input" ParameterName="@ativo" Precision="0" ProviderType="String" Scale="0" Size="0" SourceColumn="ativo" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@idPessoa" Precision="0" ProviderType="Int32" Scale="0" Size="0" SourceColumn="idPessoa" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Cadastro" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="Cadastro" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@CadastradoPor" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="CadastradoPor" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Edicao" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="Edicao" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@EditadoPor" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="EditadoPor" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>SELECT `idUsuario`, `user`, `pass`, `ativo`, `idPessoa`, `Cadastro`, `CadastradoPor`, `Edicao`, `EditadoPor` FROM `usuario`</CommandText>
                    <Parameters />
                  </DbCommand>
                </SelectCommand>
                <UpdateCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>UPDATE `usuario` SET `user` = @user, `pass` = @pass, `ativo` = @ativo, `idPessoa` = @idPessoa, `Cadastro` = @Cadastro, `CadastradoPor` = @CadastradoPor, `Edicao` = @Edicao, `EditadoPor` = @EditadoPor WHERE ((`idUsuario` = @Original_idUsuario))</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@user" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="user" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@pass" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="pass" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="StringFixedLength" Direction="Input" ParameterName="@ativo" Precision="0" ProviderType="String" Scale="0" Size="0" SourceColumn="ativo" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@idPessoa" Precision="0" ProviderType="Int32" Scale="0" Size="0" SourceColumn="idPessoa" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Cadastro" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="Cadastro" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@CadastradoPor" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="CadastradoPor" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Edicao" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="Edicao" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@EditadoPor" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="EditadoPor" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_idUsuario" Precision="0" ProviderType="Int32" Scale="0" Size="0" SourceColumn="idUsuario" SourceColumnNullMapping="false" SourceVersion="Original" />
                    </Parameters>
                  </DbCommand>
                </UpdateCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="idUsuario" DataSetColumn="idUsuario" />
              <Mapping SourceColumn="user" DataSetColumn="user" />
              <Mapping SourceColumn="pass" DataSetColumn="pass" />
              <Mapping SourceColumn="ativo" DataSetColumn="ativo" />
              <Mapping SourceColumn="idPessoa" DataSetColumn="idPessoa" />
              <Mapping SourceColumn="Cadastro" DataSetColumn="Cadastro" />
              <Mapping SourceColumn="CadastradoPor" DataSetColumn="CadastradoPor" />
              <Mapping SourceColumn="Edicao" DataSetColumn="Edicao" />
              <Mapping SourceColumn="EditadoPor" DataSetColumn="EditadoPor" />
            </Mappings>
            <Sources />
          </TableAdapter>
        </Tables>
        <Sources />
      </DataSource>
    </xs:appinfo>
  </xs:annotation>
  <xs:element name="sgiDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:EnableTableAdapterManager="True" msprop:Generator_DataSetName="sgiDataSet" msprop:Generator_UserDSName="sgiDataSet">
    <xs:complexType>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="usuario" msprop:Generator_TableClassName="usuarioDataTable" msprop:Generator_TableVarName="tableusuario" msprop:Generator_TablePropName="usuario" msprop:Generator_RowDeletingName="usuarioRowDeleting" msprop:Generator_UserTableName="usuario" msprop:Generator_RowChangingName="usuarioRowChanging" msprop:Generator_RowEvHandlerName="usuarioRowChangeEventHandler" msprop:Generator_RowDeletedName="usuarioRowDeleted" msprop:Generator_RowEvArgName="usuarioRowChangeEvent" msprop:Generator_RowChangedName="usuarioRowChanged" msprop:Generator_RowClassName="usuarioRow">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="idUsuario" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_ColumnVarNameInTable="columnidUsuario" msprop:Generator_ColumnPropNameInRow="idUsuario" msprop:Generator_ColumnPropNameInTable="idUsuarioColumn" msprop:Generator_UserColumnName="idUsuario" type="xs:int" />
              <xs:element name="user" msprop:Generator_ColumnVarNameInTable="columnuser" msprop:Generator_ColumnPropNameInRow="user" msprop:Generator_ColumnPropNameInTable="userColumn" msprop:Generator_UserColumnName="user">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="45" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="pass" msprop:Generator_ColumnVarNameInTable="columnpass" msprop:Generator_ColumnPropNameInRow="pass" msprop:Generator_ColumnPropNameInTable="passColumn" msprop:Generator_UserColumnName="pass" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ativo" msprop:Generator_ColumnVarNameInTable="columnativo" msprop:Generator_ColumnPropNameInRow="ativo" msprop:Generator_ColumnPropNameInTable="ativoColumn" msprop:Generator_UserColumnName="ativo">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="1" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="idPessoa" msprop:Generator_ColumnVarNameInTable="columnidPessoa" msprop:Generator_ColumnPropNameInRow="idPessoa" msprop:Generator_ColumnPropNameInTable="idPessoaColumn" msprop:Generator_UserColumnName="idPessoa" type="xs:int" />
              <xs:element name="Cadastro" msprop:Generator_ColumnVarNameInTable="columnCadastro" msprop:Generator_ColumnPropNameInRow="Cadastro" msprop:Generator_ColumnPropNameInTable="CadastroColumn" msprop:Generator_UserColumnName="Cadastro" type="xs:dateTime" minOccurs="0" />
              <xs:element name="CadastradoPor" msprop:Generator_ColumnVarNameInTable="columnCadastradoPor" msprop:Generator_ColumnPropNameInRow="CadastradoPor" msprop:Generator_ColumnPropNameInTable="CadastradoPorColumn" msprop:Generator_UserColumnName="CadastradoPor" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Edicao" msprop:Generator_ColumnVarNameInTable="columnEdicao" msprop:Generator_ColumnPropNameInRow="Edicao" msprop:Generator_ColumnPropNameInTable="EdicaoColumn" msprop:Generator_UserColumnName="Edicao" type="xs:dateTime" minOccurs="0" />
              <xs:element name="EditadoPor" msprop:Generator_ColumnVarNameInTable="columnEditadoPor" msprop:Generator_ColumnPropNameInRow="EditadoPor" msprop:Generator_ColumnPropNameInTable="EditadoPorColumn" msprop:Generator_UserColumnName="EditadoPor" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:choice>
    </xs:complexType>
    <xs:unique name="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:usuario" />
      <xs:field xpath="mstns:idUsuario" />
    </xs:unique>
  </xs:element>
</xs:schema>